<?php
/**
 * 地区控制器
 * @author maniac
 */
namespace app\manage\controller;

use app\facade\Regions AS RegionsFacade;

class Regions extends Base
{
    /**
     * 获取地区信息
     */
    public function regions()
    {
        $province_id = input('post.province_id/d', 0);
        $city_id     = input('post.city_id/d', 0);
        $district_id = input('post.district_id/d', 0);
        $data = RegionsFacade::regions($province_id, $city_id, $district_id);

        if (!empty($data)) {
            return j(0, '获取数据成功', $data);
        }
        return j(1, '获取数据失败');
    }
}
